print("hello py")

days = 100
money = 100.09
name = "zjw"
print("我现在有", money, "人民币")
# for i in range(1,money+1):
#     print(i)

print(type(money))
print(type(name))
print(type(days))
print(int(money))
print("我是%s，我现在有%s" % (name, money))

#格式化输出
print("days宽度限制5，结果是%5d" % days)
print("money宽度限制5，结果是%5d" % money)
print("money宽度限制5，结果是%3.4f" % money)
print(f"我是{name},我现在手上有{money}")

#if条件判断
check = 10 > 3
# if check:
#     print("yes")
#     print("666")
# else:
#     print("no")

#嵌套if条件判断
flag = 10 > 3
if check:
    print("yes")
    print("666")
    if flag:
        print("sure")
    else:
        print("sure not")
else:
    print("no")

#input输入
# print("你是谁？")
# name = input()
# print("我是%s" % name)

#for循环
count = 0
for i in name:
    print(i)
    if i == "z":
        count += 1
print(count)

#range
start = 1
end = 10
for i in range(days):
    print(i)

for i in range(start, end):
    print(i)

for i in range(start, end, 2):
    print(i)

for i in range(start, end):
    for j in range(start, end):
        print("乘法表 %s * %s = %s" % (i, j, i * j))

for i in range(start, end):
    print(i)
    if i % 3 == 0:
        break

#while循环
j = 0
k = 0
while j < 10:
    print("j = %s" % j)
    k = k + j
    j = j + 1
print(k)

